package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.IModel;
import com.xbongbong.pro.domain.entity.UpdateDataEntity;
import com.xbongbong.saas.domain.entity.FundTransferEntity;
import org.elasticsearch.action.support.WriteRequest;

import java.util.List;
import java.util.Map;


/**
 * @author bomfish
 */
public interface FundTransferModel extends IModel<FundTransferEntity> {
   Integer insert(FundTransferEntity entity) throws XbbException;

   List<FundTransferEntity> findEntitys(Map<String, Object> param);

   Integer getEntitysCount(Map<String, Object> param);

   Integer update(FundTransferEntity entity) throws XbbException;

   FundTransferEntity getByKey(Long key, String corpid);

   List findEntitysWithoutSub(Map<String, Object> param);
   /**
    * 批量更新
    * @param updateList 供应商id列表
    * @param corpid 公司id
    * @return
    * @throws XbbException
    */
   Integer updateBatch(List<UpdateDataEntity> updateList, String corpid) throws XbbException;
   /**
    * 批量更新
    * @param updateList
    * @param corpid
    * @param refreshPolicy
    * @return
    */
   Integer updateBatch(List<UpdateDataEntity> updateList, String corpid, WriteRequest.RefreshPolicy refreshPolicy) throws XbbException;

    void deleteBatch(List<Long> ids, String corpid) throws XbbException;
}
